home *** CD-ROM | disk | FTP | other *** search
/ Chip 1996 September / CHIP 1996 szeptember (CD07).zip / CHIP_CD07.ISO / povray30 / povmsdos.exe / POVMSDOS.ZIP / INCLUDE / GOLDS.INC < prev    next >
Text File  |  1996-02-21  |  9KB  |  234 lines

  1. #ifdef(Gold_Inc_Temp)
  2. // do nothing
  3. #else
  4. #declare Gold_Inc_Temp=version
  5. #version 3.0
  6.  
  7. #ifdef(View_POV_Include_Stack)
  8. #   debug "including golds.inc\n"
  9. #end
  10.  
  11. /*
  12.               Persistence of Vision Raytracer Version 3.0
  13.                       Gold textures
  14. */
  15.  
  16. #declare GoldBase = <1.00, 0.875, 0.575>  // mine again
  17.  
  18. // This set shifts the color toward orange by subtracting
  19. // bluegreen from the base color.
  20. #declare CVect1 = GoldBase  - <0.00, 0.20, 0.40>
  21. #declare CVect2 = GoldBase  - <0.00, 0.15, 0.30>
  22. #declare CVect3 = GoldBase  - <0.00, 0.10, 0.20>
  23. #declare CVect4 = GoldBase  - <0.00, 0.05, 0.1>
  24. #declare CVect5 = GoldBase  - <0.00, 0.00, 0.00>
  25.  
  26. // Cast CVect as an rgb vector
  27. #declare P_Gold1    = rgb CVect1             // back row
  28. #declare P_Gold2    = rgb CVect2
  29. #declare P_Gold3    = rgb CVect3
  30. #declare P_Gold4    = rgb CVect4
  31. #declare P_Gold5    = rgb CVect5             // front row
  32.  
  33. // Reflection colors, derived from pigment color, "grayed down" a touch.
  34. #declare R_GoldA =  P_Gold1 * 0.30 + 0.25        // left column (soft)
  35. #declare R_GoldB =  P_Gold2 * 0.35 + 0.25
  36. #declare R_GoldC =  P_Gold3 * 0.40 + 0.25
  37. #declare R_GoldD =  P_Gold4 * 0.45 + 0.25
  38. #declare R_GoldE =  P_Gold5 * 0.50 + 0.25        // right column (hard)
  39.  
  40.  
  41. // Ambient colors, derived from base color
  42. #declare A_GoldA    =  P_Gold1 * 0.12 + 0.1      // left column  (soft)
  43. #declare A_GoldB    =  P_Gold2 * 0.10 + 0.1
  44. #declare A_GoldC    =  P_Gold3 * 0.08 + 0.1
  45. #declare A_GoldD    =  P_Gold4 * 0.05 + 0.1
  46. #declare A_GoldE    =  P_Gold5 * 0.02 + 0.1      // right column (hard)
  47.  
  48. // Diffuse values
  49. // Calculated as 1 - (ambient+reflective+specular values)
  50. #declare D_GoldA    = 1-(((R_GoldA.red+R_GoldA.green+R_GoldA.blue)/3)
  51.                        + ((A_GoldA.red+A_GoldA.green+A_GoldA.blue)/3))
  52. #declare D_GoldB    = 1-(((R_GoldB.red+R_GoldB.green+R_GoldB.blue)/3)
  53.                        + ((A_GoldB.red+A_GoldB.green+A_GoldB.blue)/3))
  54. #declare D_GoldC    = 1-(((R_GoldC.red+R_GoldC.green+R_GoldC.blue)/3)
  55.                        + ((A_GoldC.red+A_GoldC.green+A_GoldC.blue)/3))
  56. #declare D_GoldD    = 1-(((R_GoldD.red+R_GoldD.green+R_GoldD.blue)/3)
  57.                        + ((A_GoldD.red+A_GoldD.green+A_GoldD.blue)/3))
  58. #declare D_GoldE    = 1-(((R_GoldE.red+R_GoldE.green+R_GoldE.blue)/3)
  59.                        + ((A_GoldE.red+A_GoldE.green+A_GoldE.blue)/3))
  60.  
  61. #declare D_GoldA = max(D_GoldA, 0)
  62. #declare D_GoldB = max(D_GoldB, 0)
  63. #declare D_GoldC = max(D_GoldC, 0)
  64. #declare D_GoldD = max(D_GoldD, 0)
  65. #declare D_GoldE = max(D_GoldE, 0)
  66.  
  67.  
  68. // #debug "\nReflection colors:"
  69. // #debug concat("\nR_GoldA=<", str(R_GoldA.red,   5, 5), "," ,
  70. //                              str(R_GoldA.green, 5, 5),"," ,
  71. //                              str(R_GoldA.blue,  5, 5), ">")
  72. // #debug concat("\nR_GoldB=<", str(R_GoldB.red,   5, 5), "," ,
  73. //                              str(R_GoldB.green, 5, 5),"," ,
  74. //                              str(R_GoldB.blue,  5, 5), ">")
  75. // #debug concat("\nR_GoldC=<", str(R_GoldC.red,   5, 5), "," ,
  76. //                              str(R_GoldC.green, 5, 5),"," ,
  77. //                              str(R_GoldC.blue,  5, 5), ">")
  78. // #debug concat("\nR_GoldD=<", str(R_GoldD.red,   5, 5), "," ,
  79. //                              str(R_GoldD.green, 5, 5),"," ,
  80. //                              str(R_GoldD.blue,  5, 5), ">")
  81. // #debug concat("\nR_GoldE=<", str(R_GoldE.red,   5, 5), "," ,
  82. //                              str(R_GoldE.green, 5, 5),"," ,
  83. //                              str(R_GoldE.blue,  5, 5), ">")
  84. //
  85. // #debug "\n\nAmbient colors:"
  86. // #debug concat("\nA_GoldA=<", str(A_GoldA.red,   5, 5), "," ,
  87. //                              str(A_GoldA.green, 5, 5),"," ,
  88. //                              str(A_GoldA.blue,  5, 5), ">")
  89. // #debug concat("\nA_GoldB=<", str(A_GoldB.red,   5, 5), "," ,
  90. //                              str(A_GoldB.green, 5, 5),"," ,
  91. //                              str(A_GoldB.blue,  5, 5), ">")
  92. // #debug concat("\nA_GoldC=<", str(A_GoldC.red,   5, 5), "," ,
  93. //                              str(A_GoldC.green, 5, 5),"," ,
  94. //                              str(A_GoldC.blue,  5, 5), ">")
  95. // #debug concat("\nA_GoldD=<", str(A_GoldD.red,   5, 5), "," ,
  96. //                              str(A_GoldD.green, 5, 5),"," ,
  97. //                              str(A_GoldD.blue,  5, 5), ">")
  98. // #debug concat("\nA_GoldE=<", str(A_GoldE.red,   5, 5), "," ,
  99. //                              str(A_GoldE.green, 5, 5),"," ,
  100. //                              str(A_GoldE.blue,  5, 5), ">")
  101. //
  102. //
  103. // #debug "\n\nDiffuse values:"
  104. // #debug concat("\nD_GoldA = ",str(D_GoldA, 5, 5))
  105. // #debug concat("\nD_GoldB = ",str(D_GoldB, 5, 5))
  106. // #debug concat("\nD_GoldC = ",str(D_GoldC, 5, 5))
  107. // #debug concat("\nD_GoldD = ",str(D_GoldD, 5, 5))
  108. // #debug concat("\nD_GoldE = ",str(D_GoldE, 5, 5))
  109. // #debug "\n"
  110.  
  111. #declare M = 1    //   Metallic amount
  112.  
  113. //*****Finishes****
  114. // Left column, dullest & darkest
  115. #declare F_MetalA  =
  116. finish {
  117.     brilliance 2
  118.     diffuse D_GoldA
  119.     ambient A_GoldA
  120.     reflection R_GoldA
  121.     metallic M
  122.     specular 0.20
  123.     roughness 1/20
  124. }
  125.  
  126. #declare F_MetalB  =
  127. finish {
  128.     brilliance 3
  129.     diffuse D_GoldB
  130.     ambient A_GoldB
  131.     reflection R_GoldB
  132.     metallic M
  133.     specular 0.30
  134.     roughness 1/60
  135. }
  136.  
  137. #declare F_MetalC  =
  138. finish {
  139.     brilliance 4
  140.     diffuse D_GoldC
  141.     ambient A_GoldC
  142.     reflection R_GoldC
  143.     metallic M
  144.     specular 0.60
  145.     roughness 1/80
  146. }
  147.  
  148. #declare F_MetalD  =
  149. finish {
  150.     brilliance 5
  151.     diffuse D_GoldD
  152.     ambient A_GoldD
  153.     reflection R_GoldD
  154.     metallic M
  155.     specular 0.70
  156.     roughness 1/100
  157. }
  158.  
  159. #declare F_MetalE  =
  160. finish {
  161.     brilliance 6
  162.     diffuse D_GoldE
  163.     ambient A_GoldE
  164.     reflection R_GoldE
  165.     metallic M
  166.     specular 0.80
  167.     roughness 1/120
  168. }
  169.  
  170. //                              GOLDS
  171. #declare T_Gold_1A = texture { pigment { P_Gold1 } finish { F_MetalA } }
  172. #declare T_Gold_1B = texture { pigment { P_Gold1 } finish { F_MetalB } }
  173. #declare T_Gold_1C = texture { pigment { P_Gold1 } finish { F_MetalC } }
  174. #declare T_Gold_1D = texture { pigment { P_Gold1 } finish { F_MetalD } }
  175. #declare T_Gold_1E = texture { pigment { P_Gold1 } finish { F_MetalE } }
  176.  
  177. #declare T_Gold_2A = texture { pigment { P_Gold2 } finish { F_MetalA } }
  178. #declare T_Gold_2B = texture { pigment { P_Gold2 } finish { F_MetalB } }
  179. #declare T_Gold_2C = texture { pigment { P_Gold2 } finish { F_MetalC } }
  180. #declare T_Gold_2D = texture { pigment { P_Gold2 } finish { F_MetalD } }
  181. #declare T_Gold_2E = texture { pigment { P_Gold2 } finish { F_MetalE } }
  182.  
  183. #declare T_Gold_3A = texture { pigment { P_Gold3 } finish { F_MetalA } }
  184. #declare T_Gold_3B = texture { pigment { P_Gold3 } finish { F_MetalB } }
  185. #declare T_Gold_3C = texture { pigment { P_Gold3 } finish { F_MetalC } }
  186. #declare T_Gold_3D = texture { pigment { P_Gold3 } finish { F_MetalD } }
  187. #declare T_Gold_3E = texture { pigment { P_Gold3 } finish { F_MetalE } }
  188.  
  189. #declare T_Gold_4A = texture { pigment { P_Gold4 } finish { F_MetalA } }
  190. #declare T_Gold_4B = texture { pigment { P_Gold4 } finish { F_MetalB } }
  191. #declare T_Gold_4C = texture { pigment { P_Gold4 } finish { F_MetalC } }
  192. #declare T_Gold_4D = texture { pigment { P_Gold4 } finish { F_MetalD } }
  193. #declare T_Gold_4E = texture { pigment { P_Gold4 } finish { F_MetalE } }
  194.  
  195. #declare T_Gold_5A = texture { pigment { P_Gold5 } finish { F_MetalA } }
  196. #declare T_Gold_5B = texture { pigment { P_Gold5 } finish { F_MetalB } }
  197. #declare T_Gold_5C = texture { pigment { P_Gold5 } finish { F_MetalC } }
  198. #declare T_Gold_5D = texture { pigment { P_Gold5 } finish { F_MetalD } }
  199. #declare T_Gold_5E = texture { pigment { P_Gold5 } finish { F_MetalE } }
  200.  
  201. //The following #declares are needed for stage_xz.pov
  202.  
  203. #declare T01 = texture { T_Gold_1A }
  204. #declare T02 = texture { T_Gold_1B }
  205. #declare T03 = texture { T_Gold_1C }
  206. #declare T04 = texture { T_Gold_1D }
  207. #declare T05 = texture { T_Gold_1E }
  208.  
  209. #declare T06 = texture { T_Gold_2A }
  210. #declare T07 = texture { T_Gold_2B }
  211. #declare T08 = texture { T_Gold_2C }
  212. #declare T09 = texture { T_Gold_2D }
  213. #declare T10 = texture { T_Gold_2E }
  214.  
  215. #declare T11 = texture { T_Gold_3A }
  216. #declare T12 = texture { T_Gold_3B }
  217. #declare T13 = texture { T_Gold_3C }
  218. #declare T14 = texture { T_Gold_3D }
  219. #declare T15 = texture { T_Gold_3E }
  220.  
  221. #declare T16 = texture { T_Gold_4A }
  222. #declare T17 = texture { T_Gold_4B }
  223. #declare T18 = texture { T_Gold_4C }
  224. #declare T19 = texture { T_Gold_4D }
  225. #declare T20 = texture { T_Gold_4E }
  226.  
  227. #declare T21 = texture { T_Gold_5A }
  228. #declare T22 = texture { T_Gold_5B }
  229. #declare T23 = texture { T_Gold_5C }
  230. #declare T24 = texture { T_Gold_5D }
  231. #declare T25 = texture { T_Gold_5E }
  232. #version Gold_Inc_Temp
  233. #end
  234.